//
//  NetWorkerManager+ListedData.m
//  Utils
//
//  Created by enghou on 2018/4/14.
//  Copyright © 2018年 xyxorigation. All rights reserved.
//

#import "NetWorkerManager+ListedData.h"

@implementation NetWorkerManager (ListedData)
-(void)getListWithPath:(NSString *)path param:(NSDictionary *)param itemModelClsName:(NSString *)clsName successBlock:(completeBlock)suc failBlock:(failBlock)fail{
    [self postWithPath:path parameter:param completeBlock:^(NSDictionary *source) {
        BaseModel *model = [[BaseModel alloc]initWithSourceDict:source listItemClass:NSClassFromString(clsName)];
        suc(model);
    } failBlock:^(NSInteger code) {
        fail(code);
    }];
}
@end
